﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class InventariosFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As InventariosBE
        Dim tmpInventarios As InventariosBE = New InventariosBE()
        Try
            With tmpInventarios
                .ClaProducto = convertDTFromDb.ConvertString(dr.Item("ClaProducto"))
                .DesProducto = convertDTFromDb.ConvertString(dr.Item("DesProducto"))
                .EntIni = convertDTFromDb.ConvertDecimal(dr.Item("EntIni"))
                .Entradas = convertDTFromDb.ConvertDecimal(dr.Item("Entradas"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Precio = convertDTFromDb.ConvertDecimal(dr.Item("Precio"))
                .Salidas = convertDTFromDb.ConvertDecimal(dr.Item("Salidas"))
                .Salini = convertDTFromDb.ConvertDecimal(dr.Item("Salini"))
                .UniMed = convertDTFromDb.ConvertString(dr.Item("UniMed"))
            End With
            Return tmpInventarios
        Catch ex As Exception
            Throw
        Finally
            tmpInventarios = Nothing
        End Try
    End Function
End Class
